package modelsa;

public class TransUtils {

    public static int toMinuteOfDay(int hour, int min) {
        return hour * 60 + min;
    }

    public static int stringToMinuteOfDay(String string) {
        final String[] split = string.split(":");
        int r = 0;
        try {
            r += Integer.parseInt(split[0]) * 60;
            r += Integer.parseInt(split[1]);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return r;
    }

}
